package com.zzgele.qmzb.api.dao;

import com.zzgele.qmzb.api.core.Mapper;
import com.zzgele.qmzb.api.model.User;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.HashMap;

@Repository
public interface UserMapper extends Mapper<User> {


    @Select("select max(number) from user")
    Long getMaxNumber();

    @Select("SELECT p.`status` AS jzStatus,u.family_id AS familyId FROM `user` u LEFT JOIN user_param p on u.id=p.uid where u.id=#{uid}")
    HashMap getJzInfo(Long uid);
}